<div class="fsh-rightPanel">
    <label> <input type="password" style="display: none"></label>
    <div class="layui-anim layui-anim-upbit">
        <div class="layui-form-item wx-search" id="list_form">
            <div class="layui-inline">
                <input type="text" name="squad_name" placeholder="请输入班级名称" autocomplete="off" class="layui-input">
            </div>
            <button class="layui-btn btn-primary" id="search">搜索</button>
        </div>
        <table id="classTable" class="layui-hide" lay-filter="classTable"></table>
    </div>
</div>
<script>
    layui.use(['layer', 'table'], function () {
        var layer = layui.layer;
        var table = layui.table;
        var tableObj = table.render({
            elem: '#classTable',
            url: context + '/api/squad/getList?school='+userInfo.school_id,
            request: {
                limitName: 'pageSize' //每页数据量的参数名，默认：limit
            },
            align: 'center'
            , cols: [[ //表头
                {type: 'checkbox', fixed: 'left'},
                {field: 'squad_name', title: '班级名称', align: 'center'},
                {field: 'squad_num', title: '班级人数', align: 'center'},
                {field: 'teacher_name', title: '老师', align: 'center'},
                {field: 'school_name', title: '所属学校', align: 'center'},
                {field: 'the_school_time', title: '入学时间', align: 'center'},
                {field: 'time_of_graduation', title: '毕业时间', align: 'center'},
                {
                    field: 'status', title: '是否毕业', align: 'center', templet: function (d) {
                        return d.status == 1 ? '是' : '否';
                    }
                },
            ]]
            , page: true

        });

        // 检索
        $("#search").click(function () {
            reloadTable(tableObj);
        });

    });
</script>
